home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / generic / generic.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.6 KB  |  102 lines

  1. /*
  2.  * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17.  
  18. #ifndef _GENERIC_APP
  19. #define _GENERIC_APP
  20.  
  21. /* currentfilename is the name of the currently-open file.  If there
  22.  * is none, currentfilename[0] == 0.
  23.  */
  24.  
  25. extern char currentfilename[];
  26.  
  27. /* flags: */
  28.  
  29. extern long    VIEW_ONLY, view_only;
  30. extern long    MAKE_BACKUPS;
  31. extern long    foreground_flag, dirtyfile_flag;
  32. extern long     xorg, yorg, xsize, ysize;
  33.  
  34. #define PROG_NAME   "generic"
  35. #define PROG_VERSION    "0.1"
  36.  
  37. #define PULLDOWNHEIGHT 26
  38.  
  39. void handlenewcmd();
  40. void handleopencmd();
  41. void handlesavecmd();
  42. void handlesaveascmd();
  43. void handleinsertcmd();
  44. void handleprintcmd();
  45. void handlequitcmd();
  46. void handleerrorwrite(long);
  47. void handlehelpcmd();
  48. long getfilename(char *, char *, char *, char *, char *, long (*)(char *));
  49. void doopen(char *);
  50. void initsignal();
  51. void getwindowinfo();
  52. void makewintitle();
  53. void setdirtyfile();
  54. void cleardirtyfile();
  55.  
  56. long message(char *, char *, char *, char *);
  57. void writecheckpointfile();
  58. void writebackupfile();
  59. void savemat();
  60. void restoremat();
  61.  
  62. void makepulldown();
  63. void drawpulldown();
  64. long pulldownevent(long, long);
  65. void remakepulldown();
  66.  
  67. #define NEWCMD        100001
  68. #define OPENCMD        100002
  69. #define SAVECMD        100003
  70. #define SAVEASCMD   100004
  71. #define INSERTCMD   100005
  72. #define PRINTCMD    100006
  73. #define QUITCMD        100007
  74. #define HELPCMD        100008
  75.  
  76. #define TOUCHME        100009
  77.  
  78. long openstatus(char *);
  79.  
  80. /* returns from openstatus() */
  81.  
  82. #define FILE_EXISTS     1
  83. #define CAN_WRITE_FILE    2
  84.  
  85. struct application_entries {
  86.     long    (*readfile)(char *);
  87.     long    (*writefile)(char *);
  88.     long    (*errorwritefile)(char *);
  89.     long    (*insertfile)(char *);
  90.     long    (*printfile)(char *);
  91.     void    (*makecheckpointname)(char *);
  92.     void    (*makebackupname)(char *);
  93.     void    (*clearbuffer)();
  94.     void    (*help)();
  95.     void    (*quit)();
  96.     void    (*exit)();
  97. };
  98.  
  99. extern struct application_entries entries;
  100.  
  101. #endif /* _GENERIC_APP */
  102.